<%-- 
    Document   : add_league
    Created on : Jan 1, 2013, 11:02:53 AM
    Author     : thaidacvinh
--%>

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="html" uri="http://struts.apache.org/tags-html" %>
<%@taglib prefix="bean" uri="http://struts.apache.org/tags-bean" %>
<%-- Report any errors (if any) --%>
<html:errors />

<%-- Generate main body --%>
<p>
    This form allows you to create a new soccer league.
</p>
<html:form action="/admin/add_league.do" method="POST"
           focus="yearStr">
    <%-- Repopulate the year field --%>
    <bean:message key="label.admin.add_league.yearField" />: 
    <html:text property="yearStr" />
    <br/><br/>
    <%-- Repopulate the season drop-down menu --%>
    <bean:message key="label.admin.add_league.seasonField" />:
    <html:select property='season'>
        <html:option value="UNKNOWN">select...</html:option>
        <c:forEach var="season" items="${requestScope.seasons}">
            <html:option value="${season}">${season}</html:option>
        </c:forEach>
    </html:select>
    <br/><br/>
    <%-- Repopulate the title field --%>
    <bean:message key="label.admin.add_league.titleField" />: 
    <html:text property="title" />
    <br/><br/>
    <%-- The submit button --%>
    <html:submit value="Add League" />
</html:form>